<?php

/**
 * Cuantificador form.
 *
 * @package    AltargetEcommerce
 * @subpackage form
 * @author     Carlo Lopez
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class CuantificadorForm extends BaseCuantificadorForm
{
  public function configure()
  {
    /*
    unset(
      $this['created_at'], $this['updated_at']
    );
    */

    $this->setWidget('nombre',new sfWidgetFormInputText());
    $this->setValidator('nombre', new sfValidatorString(array('max_length' => 255, 'required' => true)));

    //radio button restringido a los tipos
    $this->widgetSchema['type'] = new sfWidgetformChoice(array(
      'choices'  => Doctrine_Core::getTable('Cuantificador')->getTypes(),
      'expanded' => true,
//      'multiple' => true,
    ));

    $this->validatorSchema['type'] = new sfValidatorChoice(
      array(
        'choices'  => 
          array_keys(Doctrine_Core::getTable('Cuantificador')->getTypes()),
//        'multiple' => true,
      )
    );
    $this->useFields(array('nombre','type'));
  }
}
